import request from '@/utils/request'
// 获取基础人员
export const getStaffList = (params) => {
  return request({
    method: 'get',
    url: '/user-service/user/search',
    params
  })
}
// 删除人员
export const delUser = (id) => {
  return request({
    method: 'DELETE',
    url: `/user-service/user/${id}`
  })
}
// 获取地区
export const getArea = (params) => {
  return request({
    method: 'get',
    url: '/vm-service/region/search',
    params
  })
}
// 获取职业
export const getRole = () => {
  return request({
    method: 'get',
    url: '/user-service/role'
  })
}
// 添加人员
export const addUser = (data) => {
  return request({
    method: 'POST',
    url: '/user-service/user',
    data
  })
}
// 修改人员
export const updataUser = (data, id) => {
  return request({
    method: 'put',
    url: `/user-service/user/${id}`,
    data
  })
}
// 获取工作量列表
export const getUsersWork = (params) => {
  return request({
    method: 'get',
    url: '/user-service/user/searchUserWork',
    params
  })
}
// 获取人员详情
export const getUserParticulars = (id) => {
  return request({
    method: 'get',
    url: `/user-service/user/ ${id}`
  })
}
// 获取个人工作量
export const getUserWork = (params) => {
  return request({
    method: 'get',
    url: '/task-service/task/userWork',
    params
  })
}
// 获取运营人员（当天） 数据
export const getDayWork = (params) => {
  return request({
    method: 'get',
    url: `/task-service/task/taskReportInfo/${params.start}/${params.end}`
  })
}
// 人效统计 工单状态
export const getWorkState = (startTime, endTime) => {
  return request({
    method: 'get',
    url: `/task-service/task/collectReport/${startTime}/${endTime}`
  })
}
// 获取人效统计 top 10
export const getStatisticsTOP10 = (top) => {
  return request({
    method: 'get',
    url: `/task-service/task/userWorkTop10/${top.startTime}/${top.endTime}/${top.flag}/${top.num}`
  })
}
